<!--
 *  File:    ProdInfoHeader.jsp
 *  @Author: Peter Shen
 *  Date:    Friday, June 20, 2003

 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
-->

<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.*" %>

<%@ page contentType ="text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  Category cat = Category.getInstance("jsp.ProdInfoHeader");
  String strModuleName = "PCM";
  String privilegeCode = "10203";
  String strTableName = "ovproduct";
%>

<%@include file="/inc/PageDefault.inc"%>
<%@include file="/inc/SessionTimeout.inc"%>
<%@include file="/inc/Security.inc"%>
<%@include file="/inc/FrmDefault.inc"%>

<html>
<head>
<title>prodinfoheader</title>
<PageFlow:CheckPageFlow pageName="prodinfoheader"/>
<%
  HashMap prodinfo = (HashMap)pageContext.getAttribute("prodinfo");
  if (prodinfo == null) prodinfo = new HashMap();
  
  String fromwho = (String)pageContext.getAttribute("fromwho");
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="../../css/<%= strLanguageCode %>/script.js">
</script>
<SCRIPT language=JavaScript>
function betlink(sclass,trname)
{
	ccs=dispatcherform.trname.value;
	trs=dispatcherform.sclassnamea.value;
	ccs1=eval(ccs);
	ccs1.className=trs;
	document.dispatcherform.sclassnamea.value=sclass;
	document.dispatcherform.trname.value=trname;
}
function page_goback()
{
  <%if( fromwho.equalsIgnoreCase("stdprodsummary") ){%>
      parent.location.href="StdProdMgmtFrm.jsp?<%= OvalTools.randomURL() %>";
  <%}else if( fromwho.equalsIgnoreCase("stdproddetail") ){%>
      parent.location.href="StdProdMgmtFrm.jsp?<%= OvalTools.randomURL() %>&fromwho=stdproddetail";
      //rightFrame.location.href="StdProdDetail.jsp?<%= OvalTools.randomURL() %>";
  <%}else{%>
      parent.location.href="ProdMgmtFrm.jsp?<%= OvalTools.randomURL() %>";
  <%}%>
}

function page_summary(actionvalue,orderbyname)
{  
  var editform = summaryPrepare(dispatcherform,actionvalue,orderbyname);
  editform.action = "ProdInfoHeader.jsp?<%= OvalTools.randomURL() %>";
  editform.target = "_self";
  isRunning = true;
  editform.submit();
}
function page_action(action)
{
<%
  if(prodinfo == null){
%>
  parent.down.location.href = "blank.jsp?<%= OvalTools.randomURL() %>";
  return;
<%
  }
%>
	var orgid = dispatcherform.orgid.value;
  if(action == 'main')
  {
  
    parent.down.location.href = "ProdInfoMain.jsp?<%= OvalTools.randomURL() %>&prodid=" + dispatcherform.prodid.value + "&languagecode=<%= strLanguageCode %>&orgid=" + orgid;
    return;
  }
  if(action == 'desc')
  {
    parent.down.location.href = "ProdInfoDesc.jsp?<%= OvalTools.randomURL() %>&prodid=" + dispatcherform.prodid.value + "&languagecode=<%= strLanguageCode %>&orgid=" + orgid;
    return;
  }
  if(action == 'pack')
  {
    parent.down.location.href = "ProdInfoPack.jsp?<%= OvalTools.randomURL() %>&prodid=" + dispatcherform.prodid.value + "&languagecode=<%= strLanguageCode %>&orgid=" + orgid;
    return;
  }
  if(action == 'um')
  {
    parent.down.location.href = "ProdInfoUM.jsp?<%= OvalTools.randomURL() %>&prodid=" + dispatcherform.prodid.value + "&languagecode=<%= strLanguageCode %>&orgid=" + orgid;
    return;
  }
  if(action == 'other')
  {
    parent.down.location.href = "ProdInfoOther.jsp?<%= OvalTools.randomURL() %>&prodid=" + dispatcherform.prodid.value + "&languagecode=<%= strLanguageCode %>&orgid=" + orgid;
    return;
  }
  if(action == 'price')
  {
    parent.down.location.href = "ProdInfoPrice.jsp?<%= OvalTools.randomURL() %>&prodid=" + dispatcherform.prodid.value+'&displayflag=view' + "&languagecode=<%= strLanguageCode %>&orgid=" + orgid;
    return;
  }
  if(action == 'lifecycle')
  {
	  parent.down.location.href = "ProdInfoLifecycle.jsp?<%= OvalTools.randomURL() %>&prodid=" + dispatcherform.prodid.value + "&languagecode=<%= strLanguageCode %>&orgid=" + orgid;
	    return;
  }
  if(action == 'equipment')
  {
	  parent.down.location.href = "ProdInfoEquipment.jsp?<%= OvalTools.randomURL() %>&prodid=" + dispatcherform.prodid.value + "&languagecode=<%= strLanguageCode %>&orgid=" + orgid;
	    return;
  }
}

</SCRIPT>
</head>

<body>
<table width="100%" cellspacing="0" border="0" cellpadding="0">
<form name="dispatcherform" method="post" action="../../Dispatcher">
<input type="hidden" name="pagename" value="itemeditheader">
<input type="hidden" name="actionname">
<custom:hidden property="orgid"/>
<custom:hidden property="selectopt"/>
<custom:hidden property="categoryid"/>
<custom:hidden property="categoryorgid"/>
<custom:hidden  property="prodid"/>
<custom:hidden property="fromwho" value="<%= fromwho %>"/>
  <tr>
    <td class="summary_top"></td>
  </tr>
  <tr> 
    <td> 
      
      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
          <td style="PADDING-BOTTOM: 0px; PADDING-LEFT: 1px; PADDING-RIGHT: 1px; PADDING-TOP: 0px" class="black_line"> 
            <table border=0 cellpadding=0 cellspacing=0 
            width="100%">
              <tr> 
                <td class=black_line height="1"></td>
              </tr>
              <tbody> 
              <tr> 
                <td bgcolor=#ffffff class=m_title>&nbsp;</td>
              </tr>
              <tr> 
                <td background=../../images/<%= strLanguageCode %>/M_bg.gif  bgcolor=#ffffff valign="bottom"> 
                    <table border=0 cellpadding=0 cellspacing=0>
                      <tbody> 
                      <tr> 
                        <td><img height=20 src="" width=1></td>
                        <td width="79" background="../../images/<%= strLanguageCode %>/mark_bg.gif" id=A01 class="hand1" valign="bottom" onClick="javascript:betlink('none','A01');page_action('main');this.className='clickred'"> 
                          <div align="center"><%= label.getLabelName("L_Summary")%></div>
                        </td>
                        <td width="79" background="../../images/<%= strLanguageCode %>/mark_bg.gif" id=A02 class="hand1" valign="bottom" onClick="javascript:betlink('none','A02');page_action('desc');this.className='clickred'"> 
                          <div align="center"><%= label.getLabelName("L_Recount")%></div>
                        </td>
                        <td width="79" background="../../images/<%= strLanguageCode %>/mark_bg.gif" id=A03 class="hand1" valign="bottom" onClick="javascript:betlink('none','A03');page_action('lifecycle');this.className='clickred'"> 
                          <div align="center"><%= label.getLabelName("L_Lifeweek")%></div>
                        </td>
                        <td width="79" background="../../images/<%= strLanguageCode %>/mark_bg.gif" id=A04 class="hand1" valign="bottom" onClick="javascript:betlink('none','A04');page_action('pack');this.className='clickred'"> 
                          <div align="center"><%= label.getLabelName("L_Pack")%></div>
                        </td>
                        <td width="79" background="../../images/<%= strLanguageCode %>/mark_bg.gif" id=A05 class="hand1" valign="bottom" onClick="javascript:betlink('none','A05');page_action('um');this.className='clickred'"> 
                          <div align="center"><%= label.getLabelName("L_UM")%></div>
                        </td>
                        <td width="79" background="../../images/<%= strLanguageCode %>/mark_bg.gif" id=A06 class="hand1" valign="bottom" onClick="javascript:betlink('none','A06');page_action('other');this.className='clickred'">
                          <div align="center"><%= label.getLabelName("L_MExinfo")%></div>
                        </td>
                        <td width="79" background="../../images/<%= strLanguageCode %>/mark_bg.gif" id=A07 class="hand1" valign="bottom" onClick="javascript:betlink('none','A07');page_action('equipment');this.className='clickred'">
                          <div align="center"><%= label.getLabelName("L_OtherInfo")%></div>
                        </td>
                        <td width="79" background="../../images/<%= strLanguageCode %>/mark_bg.gif" id=A08 class="hand1" valign="bottom" onClick="javascript:betlink('none','A08');page_action('price');this.className='clickred'">
                          <div align="center"><%= label.getLabelName("L_PriceInfo")%></div>
                        </td>
                        <td width="79" class="td_center"> 
                          <input type="hidden" name="sclassnamea" value="hand1">
                          <input type="hidden" name="trname" value="A01">
                        </td>
                        <td width="79" class="td_center">&nbsp;</td>
                      </tr>
                      
                      </tbody> 
                    </table>
                </td>
              </tr>
              </tbody> 
            </table>
          </td>
        </tr>
      </table>
      </td>
  </tr>
  </form>
</table>
<script>
<%
  if(prodinfo != null){
%>
var va01 = "A01";
acs = eval(va01);
acs.className = "clickred";
betlink('none','A01');
page_action('main');
<%}else{%>
parent.down.location.href = "Blank.jsp?<%= OvalTools.randomURL() %>";
<%}%>
</script>
</body>
</html>
